//
//  QSFBaseViewController.m
//  QSF_Dev
//
//  Created by Mr.Dynasty on 2018/5/24.
//  Copyright © 2018年 Mr.Dynasty. All rights reserved.
//

#import "BaseViewController.h"
#import <CoreTelephony/CTCellularData.h>

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.view.backgroundColor = DefaultBackColor;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (UILabel *)noDataLabel {
    if (!_noDataLabel) {
        _noDataLabel = [[UILabel alloc] init];
        _noDataLabel.font = RegularMiddelFont;
        _noDataLabel.textColor = TextBlackColor;
    }
    return _noDataLabel;
}

- (UIButton *)noDataBtn {
    if (!_noDataBtn) {
        _noDataBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_noDataBtn setImage:[UIImage imageNamed:@"qsf_nodata"] forState:UIControlStateNormal];
        [_noDataBtn setImage:[UIImage imageNamed:@"qsf_nodata"] forState:UIControlStateHighlighted];
        [_noDataBtn setTitle:@"暂无数据，请点击重试" forState:UIControlStateNormal];
        [_noDataBtn setTitleColor:TextGrayColor forState:UIControlStateNormal];
        _noDataBtn.titleLabel.font = RegularDefaultFont;
        [_noDataBtn addTarget:self action:@selector(actionForRefreshNodata) forControlEvents:UIControlEventTouchUpInside];
    }
    return _noDataBtn;
}

- (void)actionForLeft:(UIButton *)button {
    if (_appearType == QSFViewAppearType_Default) {
        [self.navigationController popViewControllerAnimated:YES];
    }
    else
    {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
}

- (void)actionForRefreshNodata {
    
}

@end

